import http from "@/utils/http"

// 查询部门树
export function sysTeam_tree() {
    return http.get('/sys-team/tree')
}
// 新增部门
export function add_sysTeam(params) {
    return http.post('/sys-team',params)
}
// 新增二级-三级部门
export function edit_sysTeam(params) {
    return http.put('/sys-team',params)
}
// 删除部门
export function del_sysTeam(params) {
    return http.delete('/sys-team/'+params)
}
// 获取角色
export function list_sysRole() {
    return http.get('/sys-role/list')
}
// 新增账号
export function add_account(params) {
    return http.post('/app-account',params)
}
// 修改账号
export function edit_account(params) {
    return http.put('/app-account',params)
}
// 删除账号
export function del_account(params) {
    return http.put('/app-account/'+params)
}
// 账号列表
export function pageAccount_List(params) {
    return http.post('/app-account/pageAccount',params)
}
// 账号详情
export function appAccount_info(params) {
    return http.get('/app-account/'+params)
}
// 账号详情
export function appAccount_edit(params) {
    return http.put('/app-account/updateCustomer',params)
}

//角色页面   --------------------------------------------

//角色列表
export function sysRole_page(params) {
    return http.post('/sys-role/page',params)
}

//权限树
export function sysRole_tree(params) {
    return http.get('/sys-permission/allTree/'+params)
}
//新增角色
export function add_sysRole(params) {
    return http.post('/sys-role',params)
}
//查询角色权限详情
export function tree_sysRoleTree(params) {
    return http.get('/sys-permission/getRoPer/'+params)
}
//查询角色信息详情
export function info_sysRole(params) {
    return http.get('/sys-role/getById/'+params)
}
//删除角色
export function del_sysRole(params) {
    return http.delete('/sys-role/'+params)
}
